package com.videoweb.ying.controller;

import com.videoweb.base.BaseController;
import com.videoweb.ying.po.TShare;
import com.videoweb.ying.service.TShareService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by jsonval on 2020/1/15.
 */
@RestController
@RequestMapping("/openapi")
public class ApiShareController extends BaseController {

    @Autowired
    private TShareService tShareService;

    @GetMapping("getShareConfig")
    public Object getShareConfig(ModelMap modelMap) {
        modelMap.put("retCode", "1");
        modelMap.put("retMsg", "查询成功");

        TShare tShare = tShareService.queryById(1);
        return setSuccessResponse(modelMap, tShare);
    }
}
